//import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import "@/router/permission.js";//引入permission.js
import { useMenuStore } from './stores/menu';


import App from './App.vue'
import router from './router'

const app = createApp(App)

app.use(createPinia().use(piniaPluginPersistedstate))
//解决刷新页面后，动态路由数据丢失的问题
let menuStore = useMenuStore();
const addRouter = () => {
  menuStore.addRouter();
};
addRouter();
app.use(router)

app.mount('#app')
